import { axios } from '@/utils/request'

export function upload(parameter, url) {
  console.log('上传的文件',parameter)
    let formData = new FormData()
    formData.append('file', parameter)
    console.log('formData', formData)
    return axios({
        url: url,
        method: 'post',
        headers: { 'Content-Type': 'multipart/form-data', },
        data: formData, // 直接把formData数据传给后台
    })
}